package com.situ.day5;

import org.junit.Test;

public class Demo {

    @Test
    public void test1() {
        // new的是无参构造方法
        Student student1 = new Student();
        // access: 访问
        // 'id' has private access in 'com.situ.day5.Student'
        // student1.id = 1;
        // student1.age = 234;
        // System.out.println(student1.age);

        student1.setId(1);
        student1.setName("zhangsan");
        student1.setAge(23);
        student1.setGender("男");
        System.out.println(student1);

        Student student2 = new Student(2, "lisi", 21, "女");
        System.out.println(student2);
    }

    @Test
    public void test78() {
        Vehicle vehicle = new Vehicle(100, 23);
        vehicle.move();
        vehicle.speedUp(10);
        vehicle.move();
    }

    @Test
    public void test782() {
        Number number = new Number(3, 5);
        int result1 = number.add();
        System.out.println(result1);
        System.out.println(number.add());
    }
}
